# Short command aliases
alias mydf="df -hPT | column -t"
alias ll="ls -lah"
alias rm="rm -i"
alias cp="cp -i"
alias ls="ls --color=auto"
alias l="ls -ail"
alias cl="clear"
alias 'ems=emacsclient -t '
alias 'emsg=emacsclient -c '
alias 'l=ls'
alias 'la=ls -A'
alias 'll=ls -l'
alias 'lq=ls -Q'
alias 'lr=ls -R'
alias 'lrs=ls -lrS'
alias 'lrt=ls -lrt'
alias 'lrta=ls -lrtA'
alias 'j=jobs -l'
alias 's=ls | grep'
alias 'tf=tail -f'
alias 'grep=grep --colour'
alias '..=cd ..'
alias '../..=cd ../..'
alias 'home=cd ~/'
alias 'dir=dir --color=auto'
#alias 'ping=ping -c 3'

# Play safe!
alias 'rm=rm -i'
alias 'mv=mv -i'
alias 'cp=cp -i'

# For convenience
alias 'mkdir=mkdir -p'
alias 'dus=du -ms * | sort -n'

# Typing errors...
alias 'cd..=cd ..'

# Delete pyc
alias 'dpyc=find . -name "*.pyc" -exec rm -rf {} \;'

# Running 'b.ps' runs 'q b.ps'
alias -s ps=q
alias -s html=q

# Global aliases (expand whatever their position)
#  e.g. find . E L
alias -g L='| less'
alias -g H='| head'
alias -g S='| sort'
alias -g T='| tail'
alias -g N='> /dev/null'
alias -g E='2> /dev/null'

#------------------------------
# Alias stuff
#------------------------------
alias ls="ls --color -F"
alias ll="ls --color -lh"

alias reboot="shutdown -r now"

# do a du -hs on each dir on current path
alias lsdir="for dir in *;do;if [ -d \$dir ];then;du -hsL \$dir;fi;done"

if [ -x /usr/libexec/mc/mc-wrapper.sh ]
then
	alias mc='. /usr/libexec/mc/mc-wrapper.sh'
fi

